<?php session_start();
require('globals/setup.php');
$smarty = new Smarty_Kalender;	

$host  = $_SERVER['HTTP_HOST'];
if ($_SERVER['SERVER_NAME'] == 'localhost'){$uri= URI_L;}else{$uri= URI_P;}
if (!isset($_SESSION['id_user']) || $_SESSION['id_user']=='') {
	echo "<script language=Javascript> location.href='http://$host$uri/index.php'; </script>";	
}else{	
	
	if (!is_object($bd)){	
		require("globals/Db.class.php");
		require("globals/Conf.class.php");
		$bd=Db::getInstance();	
	}
	if (!is_object($util)){	
		include("globals/Util.class.php");		
		$util=Util::getInstance();
	}
	
	if (!($util->administrarTiempoSesion())){
		echo "<script language=Javascript> location.href='http://$host$uri/timeout.php'; </script>";
	}else if (!($util->administrarAcceso("editFile"))){
		echo "<script language=Javascript> location.href='http://$host$uri/sinAcceso.php'; </script>";
	}
	
	$smarty->assign("menuItem", "editFile");
	include("globals/menuIzquierda.php");	
	
	$smarty->display("editarArchivo206.tpl");
	
}?>